/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #333;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* 顶部导航栏 */
.navbar {
    background-color: #2d7dd2;
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
}

.search-box {
    display: flex;
    flex: 0 0 400px;
}

.search-box input {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background-color: #fff;
    color: #2d7dd2;
    padding: 0 15px;
    border-radius: 0 20px 20px 0;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #fff;
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255,255,255,0.2);
}

.nav-links a i {
    margin-right: 5px;
}

/* 主内容区布局 */
.main-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.sidebar-left {
    flex: 0 0 260px;
}

.content-middle {
    flex: 1;
}

.sidebar-right {
    flex: 0 0 280px;
}

/* 左侧个人资料卡片 */
.profile-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.cover-photo {
    height: 140px;
    position: relative;
}

.cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: -50px auto 0;
    border: 4px solid #fff;
    overflow: hidden;
    position: relative;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-btn {
    position: absolute;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.cover-edit {
    bottom: 10px;
    right: 10px;
}

.avatar-edit {
    bottom: 0;
    right: 0;
}

.cover-photo:hover .cover-edit, .avatar-container:hover .avatar-edit {
    opacity: 1;
}

.profile-info {
    text-align: center;
    padding: 10px 15px 20px;
}

.username {
    font-size: 18px;
    margin-bottom: 5px;
}

.signature {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #2d7dd2;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

/* 左侧模块通用样式 */
.contact-module, .friends-module {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.module-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    color: #2d7dd2;
}

.module-title i {
    margin-right: 8px;
}

.contact-list {
    font-size: 13px;
}

.contact-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-list li i {
    width: 20px;
    color: #666;
    margin-right: 8px;
}

.friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-item {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 3px;
}

.friend-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.see-more {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #2d7dd2;
    margin-top: 10px;
    padding: 5px 0;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.see-more:hover {
    background-color: #f0f7ff;
}

/* 中间发布动态模块 */
.post-module {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.post-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.post-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.post-input {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 25px;
    padding: 12px 15px;
    resize: none;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

.post-input:focus {
    border-color: #2d7dd2;
}

.post-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-btn {
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.tool-btn:hover {
    color: #2d7dd2;
    background-color: #f0f7ff;
}

.post-btn {
    background-color: #2d7dd2;
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.post-btn:hover {
    background-color: #1a6ed8;
}

/* 内容标签页 */
.content-tabs {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    font-size: 15px;
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: #2d7dd2;
    color: #fff;
}

.tab-btn:hover:not(.active) {
    background-color: #f5f5f5;
}

/* 动态内容列表 */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feed-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feed-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.feed-userinfo {
    flex: 1;
}

.feed-username {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 2px;
}

.feed-time {
    font-size: 12px;
    color: #999;
}

.feed-content {
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.8;
}

.feed-images {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.feed-image {
    width: calc(33.333% - 3.333px);
    height: 120px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.feed-image:hover {
    transform: scale(1.02);
}

.feed-video {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 15px;
}

.feed-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.action-btn {
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 13px;
}

.action-btn:hover {
    color: #2d7dd2;
    background-color: #f0f7ff;
}

.loading {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 14px;
}

.loading i {
    margin-right: 8px;
    font-size: 18px;
}

/* 右侧模块通用样式 */
.album-preview, .video-preview, .log-recommend, .visitor-module {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 15px;
}

.album-item {
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
}

.album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.album-item:hover img {
    transform: scale(1.05);
}

.video-list {
    margin-bottom: 15px;
}

.video-item {
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.video-thumbnail {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-item:hover .video-play {
    opacity: 1;
}

.video-title {
    font-size: 13px;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-list {
    margin-bottom: 15px;
}

.log-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.log-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.log-title {
    font-size: 14px;
    margin-bottom: 3px;
    transition: color 0.3s;
}

.log-title:hover {
    color: #2d7dd2;
}

.log-time {
    font-size: 12px;
    color: #999;
}

.visitors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.visitor-item {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.visitor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 3px;
}

.visitor-name {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

/* 页脚 */
.footer {
    background-color: #2d7dd2;
    color: #fff;
    padding: 20px 0;
    margin-top: 40px;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        width: 720px;
    }
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
    }
    .sidebar-left {
        display: none;
    }
    .search-box {
        flex: 0 0 200px;
    }
    .nav-links a span {
        display: none;
    }
    .nav-links a i {
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .search-box {
        display: none;
    }
    .feed-image {
        width: calc(50% - 2.5px);
    }
}